<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GSoC2011SfM: D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/PointsMatcher.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">GSoC2011SfM
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">Google Summer of Code 2011: Structure from motion</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/PointsMatcher.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _GSOC_SFM_POINTSMATCHED_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _GSOC_SFM_POINTSMATCHED_H 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;macro.h&quot;</span> <span class="comment">//SFM_EXPORTS</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;opencv2/features2d/features2d.hpp&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;config_SFM.h&quot;</span>  <span class="comment">//SEMAPHORE</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="keyword">namespace </span>OpencvSfM{
<a name="l00012"></a>00012   <span class="keyword">class </span>SFM_EXPORTS PointsToTrack;
<a name="l00017"></a><a class="code" href="class_opencv_sf_m_1_1_points_matcher.html">00017</a>   <span class="keyword">class </span>SFM_EXPORTS <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>
<a name="l00018"></a>00018   {
<a name="l00023"></a>00023     DECLARE_MUTEX( thread_concurr );
<a name="l00024"></a>00024   <span class="keyword">public</span>:
<a name="l00029"></a>00029     <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>( <span class="keyword">const</span> cv::Ptr&lt;cv::DescriptorMatcher&gt;&amp; matcher );
<a name="l00030"></a>00030 
<a name="l00034"></a>00034     <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>( <span class="keyword">const</span> <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>&amp; copy );
<a name="l00038"></a>00038     <span class="keyword">virtual</span> ~<a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>( );
<a name="l00039"></a>00039 
<a name="l00046"></a><a class="code" href="class_opencv_sf_m_1_1_points_matcher.html#a93b7f1261b9ec8f8b27970585fb82c3b">00046</a>     <span class="keyword">static</span> cv::Ptr&lt;PointsMatcher&gt; create( std::string match_algo )
<a name="l00047"></a>00047     {
<a name="l00048"></a>00048       <span class="keywordflow">return</span> cv::Ptr&lt;PointsMatcher&gt;( <span class="keyword">new</span> <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>(
<a name="l00049"></a>00049         cv::DescriptorMatcher::create( match_algo ) ) );
<a name="l00050"></a>00050     };
<a name="l00055"></a>00055     <span class="keyword">virtual</span> <span class="keywordtype">void</span> add( cv::Ptr&lt;PointsToTrack&gt; pointCollection );
<a name="l00059"></a>00059     <span class="keyword">virtual</span> <span class="keywordtype">void</span> clear( );
<a name="l00063"></a>00063     <span class="keyword">virtual</span> <span class="keywordtype">void</span> train( );
<a name="l00068"></a>00068     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isMaskSupported( );
<a name="l00073"></a>00073     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> empty( ) <span class="keyword">const</span>;
<a name="l00079"></a>00079     <span class="keyword">virtual</span> cv::Ptr&lt;PointsMatcher&gt; clone( <span class="keywordtype">bool</span> emptyTrainData=<span class="keyword">true</span> );
<a name="l00088"></a>00088     <span class="keyword">virtual</span> <span class="keywordtype">void</span> match( cv::Ptr&lt;PointsToTrack&gt; queryPoints,
<a name="l00089"></a>00089       std::vector&lt;cv::DMatch&gt;&amp; matches,
<a name="l00090"></a>00090       <span class="keyword">const</span> std::vector&lt;cv::Mat&gt;&amp; masks = std::vector&lt;cv::Mat&gt;( ) );
<a name="l00102"></a>00102     <span class="keyword">virtual</span> <span class="keywordtype">void</span> knnMatch( cv::Ptr&lt;PointsToTrack&gt; queryPoints,
<a name="l00103"></a>00103       std::vector&lt;std::vector&lt;cv::DMatch&gt; &gt;&amp; matches, <span class="keywordtype">int</span> k,
<a name="l00104"></a>00104       <span class="keyword">const</span> std::vector&lt;cv::Mat&gt;&amp; masks = std::vector&lt;cv::Mat&gt;( ), <span class="keywordtype">bool</span> compactResult = <span class="keyword">true</span> );
<a name="l00115"></a>00115     <span class="keyword">virtual</span> <span class="keywordtype">void</span> radiusMatch( cv::Ptr&lt;PointsToTrack&gt; queryPoints,std::vector&lt;std::vector&lt;cv::DMatch&gt; &gt;&amp; matches, <span class="keywordtype">float</span> maxDistance,
<a name="l00116"></a>00116       <span class="keyword">const</span> std::vector&lt;cv::Mat&gt;&amp; masks = std::vector&lt;cv::Mat&gt;( ), <span class="keywordtype">bool</span> compactResult = <span class="keyword">true</span> );
<a name="l00125"></a>00125     <span class="keyword">virtual</span> <span class="keywordtype">void</span> crossMatch( cv::Ptr&lt;PointsMatcher&gt; otherMatcher,
<a name="l00126"></a>00126       std::vector&lt;cv::DMatch&gt;&amp; matches,
<a name="l00127"></a>00127       <span class="keyword">const</span> std::vector&lt;cv::Mat&gt;&amp; masks = std::vector&lt;cv::Mat&gt;( ) );
<a name="l00128"></a>00128 
<a name="l00150"></a>00150     <span class="keyword">static</span> <span class="keywordtype">void</span> drawMatches( <span class="keyword">const</span> cv::Mat&amp; img1,
<a name="l00151"></a>00151       <span class="keyword">const</span> std::vector&lt;cv::KeyPoint&gt;&amp; keypoints1,
<a name="l00152"></a>00152       <span class="keyword">const</span> std::vector&lt;cv::KeyPoint&gt;&amp; keypoints2,
<a name="l00153"></a>00153       <span class="keyword">const</span> std::vector&lt;cv::DMatch&gt;&amp; matches1to2, cv::Mat&amp; outImg,
<a name="l00154"></a>00154       <span class="keyword">const</span> cv::Scalar&amp; matchColor=cv::Scalar::all( -1 ),
<a name="l00155"></a>00155       <span class="keyword">const</span> cv::Scalar&amp; singlePointColor=cv::Scalar::all( -1 ),
<a name="l00156"></a>00156       <span class="keyword">const</span> std::vector&lt;char&gt;&amp; matchesMask=std::vector&lt;char&gt;( ),
<a name="l00157"></a>00157       <span class="keywordtype">int</span> flags=cv::DrawMatchesFlags::DEFAULT
<a name="l00158"></a>00158       );
<a name="l00159"></a>00159     
<a name="l00165"></a>00165     <span class="keyword">static</span> <span class="keywordtype">void</span> read( <span class="keyword">const</span> cv::FileNode&amp; node, <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>&amp; points );
<a name="l00166"></a>00166     
<a name="l00172"></a>00172     <span class="keyword">static</span> <span class="keywordtype">void</span> write( cv::FileStorage&amp; fs, <span class="keyword">const</span> <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html" title="A class used for matching descriptors that can be described as vectors in a finite-dimensional space...">PointsMatcher</a>&amp; points );
<a name="l00173"></a>00173 
<a name="l00179"></a>00179     <span class="keyword">const</span> cv::KeyPoint &amp;getKeypoint( <span class="keywordtype">int</span> numKey ) <span class="keyword">const</span>;
<a name="l00180"></a>00180 
<a name="l00181"></a>00181   <span class="keyword">protected</span>:
<a name="l00182"></a>00182 
<a name="l00183"></a><a class="code" href="class_opencv_sf_m_1_1_points_matcher.html#a652ba26d167b0ab2dc27e8087ab8d3cf">00183</a>     cv::Ptr&lt;cv::DescriptorMatcher&gt; <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html#a652ba26d167b0ab2dc27e8087ab8d3cf" title="Algorithm used to find matches...">matcher_</a>;
<a name="l00184"></a><a class="code" href="class_opencv_sf_m_1_1_points_matcher.html#a62062498c4325863469d980c39baebc1">00184</a>     std::vector&lt; cv::Ptr&lt; PointsToTrack &gt; &gt; <a class="code" href="class_opencv_sf_m_1_1_points_matcher.html#a62062498c4325863469d980c39baebc1" title="Vector of points used to compute matches...">pointCollection_</a>;
<a name="l00185"></a>00185   };
<a name="l00186"></a>00186 
<a name="l00187"></a>00187 }
<a name="l00188"></a>00188 
<a name="l00189"></a>00189 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 21 2011 16:45:52 for GSoC2011SfM by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
